﻿/*****************************************************************************
 
 Use of Ext is under the Ext JS license, for more information, 
 please visit http://extjs.com/products/license.php page. 
  
 You should confirm that you have read, understood and accept ethical criteria listed. 
 If not, see <http://www.mvcnext.com/license/>.
  
 Version: 1.0.0.0
 Website: http://www.mvcnext.com/
 
 Copyright (c) Yoganand R. All rights reserved.
 For continued development and updates, visit http://yogsbreath.net
 
 ******************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.Web.UI;

namespace MVCnExt.Web.UI.Ext
{
    public class ExtOnReady : ExtControl
    {
        public override IList<ScriptDescriptor> GetScriptDescriptors()
        {
            IList<ScriptDescriptor> list = base.GetScriptDescriptors();

            if (list.Count == 0)
                list.Add(new ExtScriptControlDescriptor("Ext.util.Observable", this.ClientID, this.ID));

            ScriptControlDescriptorBase desc = (ScriptControlDescriptorBase)list[0];
            
            return list;
        }

        /// <summary>
        /// An array of field definition objects, or field name strings.
        /// </summary>                      
        [Description("An array of field definition objects, or field name strings.")]
        [Bindable(true)]
        [DefaultValue("")]
        [Localizable(true)]
        [PersistenceMode(PersistenceMode.InnerProperty)]
        public ExtScript script { get; set; }

    }
}
